package day3;

public class Dog {
    //记录实例化的次数
    private static int count = 0;

    public Dog() {
        count++;
    }
    //调用方法获取实例化次数
    public static int getCount(){
        return count;
    }
}
